package com.gamiao.gwt.demo.remoteServiceDemo.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface RemoteServiceDemoServlet extends RemoteService {

	public static final String SERVICE_URI = "/RemoteServiceDemoServlet";

	public String[] getComment(int clickTimes, String comment);

	public static class Util {

		public static RemoteServiceDemoServletAsync getInstance() {

			RemoteServiceDemoServletAsync instance = (RemoteServiceDemoServletAsync) GWT
					.create(RemoteServiceDemoServlet.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint(GWT.getModuleBaseURL() + SERVICE_URI);
			// System.out.println(GWT.getModuleBaseURL() + SERVICE_URI);
			return instance;
		}
	}

}
